package com.green.aop.service.impl;

import com.green.aop.entity.User;
import com.green.aop.service.IUserService;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements IUserService {
    @Override
    public int addUser() {
        System.out.println("添加用户");
        return 0;
    }

    @Override
    public int updateUser() {
        System.out.println("修改用户");
        return 0;
    }

    @Override
    public int deleteUser() {
        System.out.println("删除用户");
        return 0;
    }

    @Override
    public User serchUser() {
        int i = 1/0;
        System.out.println("查询用户");
        User user = new User();
        user.setId(1L);
        user.setName("小王");
        return user;
    }
}
